﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SystemCenterSoa.DtoModel.Common;
using SystemCenterSoa.IRepository.ContractManger;
using SystemCenterSoa.PoModel.ContractModel;

namespace SystemCenterSoa.Service.ContractManger
{
    public class ContractService
    {
        private ContractIRepository _customerIRepository;

        public ContractService(ContractIRepository customerIRepository)
        {
            _customerIRepository = customerIRepository;

        }

        public bool AgreementAdd(AgreementPo info)
        {
            return _customerIRepository.AgreementAdd(info);
        }

        public bool ContractAdd(ContractPo info)
        {
            return _customerIRepository.ContractAdd(info);
        }

        public List<Contype> GetContype()
        {
            return _customerIRepository.GetContype();
        }

        public List<StructurePo> GetStruct()
        {
            return _customerIRepository.GetStruct();
        }

        public List<ArchitecturePo> GetArchite()
        {
            return _customerIRepository.GetArchite();
        }

        public PagerResult<ContractPo> GetContract(SearchModel searchModel)
        {
            return _customerIRepository.GetContract(searchModel);
        }

        public List<AgreementPo> GetAgreelast()
        {
            return _customerIRepository.GetAgreelast();
        }

        public AgreementPo LastCha(int id)
        {
            return _customerIRepository.LastCha(id);
        }

        public ContractPo FanAgree(int id)
        {
            return _customerIRepository.FanAgree(id);
        }

        public bool UpdateContr(ContractPo info)
        {
            return _customerIRepository.UpdateContr(info);
        }
    }
}
